package com.demo.spring.importBeanDefinitionRegistrar.demo1;

import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class App {

	public static void main(String[] args) {
        // 用我们的配置文件来启动一个 ApplicationContext
		AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext("com.demo.spring.importBeanDefinitionRegistrar.demo1");
        System.out.println("context 启动成功");

        // 从容器中获取所有的bean的ID
        String[] definitionNames = context.getBeanDefinitionNames();

        for (String name : definitionNames) {
            System.out.println("------->" + name);
        }
    }

}
